home *** CD-ROM | disk | FTP | other *** search
- #include <stdio.h>
- #include <dirent.h>
-
- #define GLOBAL_DEF
-
- #include "ncd.h"
-
- #undef GLOBAL_DEF
-
- /*************************************************************************/
- /* global configuration */
-
- int _rebuild = 0; /* 0=no, 1=rebuild */
- int _scope = 0; /* 0=by actual location, 1=full, -1=home */
- int _rebauto = 1; /* 0=manual, 1=automatic */
- int _verbose = 0; /* 0=quiet, 1=verbose */
- int _justdump = 0; /* 0=norma, 1=just dump tree */
- int _lineart = 2; /* 1=lineart, 0=normal chars, 2=auto */
- int _showlink = 0; /* 0=ldir@ 1=ldir -> dir */
-
- /*************************************************************************/
- /* other global variables */
-
- char _home[PATH_MAX]; /* home dir (perhaps is a soft link...) */
- char _xhome[PATH_MAX]; /* home dir (physical directory) */
- char _cwd[PATH_MAX]; /* current working directory */
- char _root[PATH_MAX]; /* 'root' directory: / or HOME */
- char _xroot[PATH_MAX]; /* 'xroot' directory: / or xhome */
- char _finalDir[PATH_MAX]; /* final selected path */
- char _argumentDir[PATH_MAX]; /* command line argument: dir */
-
- char _homeFile[PATH_MAX]; /* home tree file */
- char _fullFile[PATH_MAX]; /* full tree file */
- char _selDirFile[PATH_MAX]; /* file for selected dir */
-
- DirNode *_rootNode; /* xroot node */
- DirNode *_lastNode; /* last node in the tree */
- int _nLinks; /* number of recursive links processed */
-
- char _searchPath[PATH_MAX]; /* direct scan path */
- int _searchPLen; /* _searchPath last length */
- int _searchPX; /* line editor horizontal position */
-
- int _x0, _y0; /* top left corner coords. */
- DirNode *_curNode; /* currently selected node */
-
- int _cols; /* screen COLS */
- int _lines; /* screen LINES */
- int _use_color; /* != 0 to use colors */
- int _cursesOn; /* != if curses has initialized display */
-
- /* refresh flags, for optimized display */
- /* != 0 if must be repainted */
- int _refCurrent; /* current cursor line */
- int _refRest; /* rest of lines */
- int _refCurDir; /* current directory field */
- int _refSearch; /* search editor line */
-
- /*************************************************************************/
-